<div class="navbar">
    <div class="navbar-inner text-center ">
        <div class="container-fluid">
          <a class="brand-custom" href="<?php echo $this->base;?>"><img style="height: 110px;" src="<?php echo $this->webroot;?>img/header.png" /></a>
            <div>
                <div class="span7 pull-right" style="padding-right: 20px;">
                    <div class="navbar-content">
                        <ul class="nav pull-right">
                            <li class="dropdown">
                                <a id="drop2" class="dropdown-toggle" data-toggle="dropdown" role="button" href="#"> <i class="<?php echo AppController::$flags[Configure::read('Config.language')];?>"></i>
                                <b class="caret"></b> </a>
                                <ul class="dropdown-menu" aria-labelledby="drop2" role="menu"  style="padding: 0;">
                                    <li role="presentation">
                                        <a href='<?php echo $this->webroot;?>Users/lang/ita' tabindex="-1" role="menuitem"><i class="famfamfam-flag-it"></i>&nbsp;<?php echo __("Italiano")?></a>
                                    </li>
                                    <li role="presentation">
                                        <a href='<?php echo $this->webroot;?>Users/lang/eng' tabindex="-1" role="menuitem"><i class="famfamfam-flag-gb"></i>&nbsp;<?php echo __("Inglese")?></a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                        <?php if(!empty($utente)) { ?>
                            <ul class="nav pull-right">
                                    <!-- <span class="label notification-menu">7</span> -->
                                <li class="dropdown">
                                    <a id="drop3" class="dropdown-toggle" data-toggle="dropdown" role="button" href="#"> 
                                        <i class="icon-user"></i>&nbsp;<?php echo !$this->request->is('mobile')?$utente['username']:"" ?>
                                    <b class="caret"></b> </a>
                                    <ul class="dropdown-menu" aria-labelledby="drop3" role="menu">
                                        <?php if($this->request->is('mobile')) { ?>
                                           <li role="presentation" class="notification-header"> <?php echo $utente['username'] ?> </li>
                                        <?php }?>
                                        <li role="presentation" <?php echo $this->here==$this->webroot.'Users/profilo'?"class='active'":""  ?> >
                                            <a href='<?php echo $this->webroot;?>Users/profilo' tabindex="-1" role="menuitem"><?php echo __("Profilo utente");?></a>
                                        </li>
                                        <li class="divider" role="presentation"></li>
                                        <li role="presentation" <?php echo $this->here==$this->webroot.'Users/password'?"class='active'":""  ?>>
                                            <a href='<?php echo $this->webroot;?>Users/password' tabindex="-1" role="menuitem"><?php echo __("Cambia password")?>&nbsp;&nbsp;&nbsp;<i class='icon-exchange'></i></a>
                                        </li>
                                        <?php if ($this->Permission->check("controllers/Parametro/index")) { ?>
                                            <li role="presentation">
                                                <a href='<?php echo $this->webroot;?>Parametro/index' tabindex="-1" role="menuitem"><?php echo __("Parametri")?>&nbsp;&nbsp;&nbsp;<i class='icon-cogs'></i></a>
                                            </li>
                                        <?php } ?>
                                        <?php if ($this->Permission->check("controllers/Info/index")) { ?>
                                            <li role="presentation">
                                                <a href='<?php echo $this->webroot;?>Info/index' tabindex="-1" role="menuitem"><?php echo __("Info")?></a>
                                            </li>
                                        <?php } ?>
                                        <li class="divider" role="presentation"></li>
                                        <?php if ($this->Permission->check("controllers/UploadXml/index")) { ?>
                                            <li role="presentation">
                                                <a href='<?php echo $this->webroot;?>UploadXml/index' tabindex="-1" role="menuitem"><?php echo __("Xml")?></a>
                                            </li>
                                        <?php } ?>
                                        <?php if ($this->Permission->check("controllers/Feed/index")) { ?>
                                            <li role="presentation">
                                                <a href='<?php echo $this->webroot;?>Feed/index' tabindex="-1" role="menuitem"><?php echo __("Feed")?></a>
                                            </li>
                                        <?php } ?>
                                        <?php if ($this->Permission->check("controllers/Bookmaker/index")) { ?>
                                            <li role="presentation">
                                                <a href='<?php echo $this->webroot;?>Bookmaker/index' tabindex="-1" role="menuitem"><?php echo __("Bookmaker")?></a>
                                            </li>
                                        <?php } ?>
                                        <li class="divider" role="presentation"></li>
                                        <li role="presentation">
                                            <a href='<?php echo $this->webroot;?>Users/logout' tabindex="-1" role="menuitem"><?php echo __("Logout")?>&nbsp;&nbsp;&nbsp;<i class='icon-signout'></i></a>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        <?php }else{ ?>
                            <ul class="nav pull-right">
                                    <li>
                                      <a href="<?php echo $this->webroot;?>Users/login">
                                        <?php echo __("Area riservata"); ?>
                                      </a>
                                    </li>
                              </ul>                     
                        <?php } ?>
                    </div>
                </div><!--/.nav-collapse -->
            </div>
        </div>
    </div>
</div>